package main

import "fmt"

func RemoveRepeatElement(list []string) []string {
	temp := make(map[string]struct{})
	index := 0
	for _, v := range list {
		temp[v] = struct{}{}
	}
	tempList := make([]string, len(temp))
	for key := range temp {
		tempList[index] = key
		index++
	}
	return tempList
}

func main() {
	list := []string{"hello", "hello", "hello", "hello", "hello", "world"}
	list = RemoveRepeatElement(list)
	fmt.Println(list)
}
